/* 音乐列表组件样式 */
.music-list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 错误提示样式 */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #ff6b6b;
  text-align: center;
}

.error-message p {
  margin: 0 0 15px 0;
  font-size: 1.1em;
}

.error-message button {
  padding: 8px 16px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.error-message button:hover {
  background: #e55a5a;
}

/* 音乐列表样式 */
.music-list {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.music-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.music-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.music-table thead tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.music-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.music-table th.sortable:hover {
  color: #4ecdc4;
}

.sort-indicator {
  margin-left: 5px;
  font-size: 0.8em;
}

.music-table tbody {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  padding-right: 10px;
}

/* 音乐列表滚动条样式 */
.music-table tbody::-webkit-scrollbar {
  width: 6px;
}

.music-table tbody::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}

.music-table tbody::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.music-table tbody::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.music-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* 确保表头和tbody使用相同的列宽 */
.music-table thead tr,
.music-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.music-table thead th,
.music-table tbody td {
  box-sizing: border-box;
}

.music-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  font-size: 13px;
}

.music-row {
  transition: all 0.3s ease;
  cursor: default;
}

.music-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 封面列样式 */
.col-cover {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center !important;
}

/* 当不显示封面时隐藏封面列 */
.music-table:not(.show-cover) .col-cover {
  display: none;
}

.cover-container {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.cover-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  color: #ccc;
}

/* 标题列样式 */
.col-title {
  min-width: 250px;
  max-width: 400px;
  width: 35%;
}

.title-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.title-text {
  flex: 1;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95em;
}

.favorite-indicator {
  color: #ffd700;
  font-size: 0.9em;
  flex-shrink: 0;
}

/* 其他列样式 */
.col-artist {
  min-width: 120px;
  max-width: 180px;
  width: 18%;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.col-album {
  min-width: 120px;
  max-width: 180px;
  width: 18%;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.col-duration {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  text-align: center !important;
  font-family: 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.col-year {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.col-filesize {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center !important;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-actions {
  width: 140px;
  min-width: 120px;
  max-width: 140px;
  text-align: center !important;
  flex-shrink: 0;
}

/* 操作按钮样式 */
.action-buttons {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 28px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.action-btn.play-btn:hover {
  background: #4ecdc4;
}

.action-btn.add-btn:hover {
  background: #ff6b6b;
}

.action-btn.favorite-btn:hover {
  background: #ffd700;
  color: #333;
}

.action-btn.favorite-btn.favorited {
  background: #ffd700;
  color: #333;
}

.action-btn.details-btn:hover {
  background: #9b59b6;
}

/* 加载状态样式 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  z-index: 100;
}

.loading-spinner {
  font-size: 2em;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #888;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  color: #666;
}

.empty-state p {
  margin: 0;
  font-size: 1em;
  opacity: 0.7;
}

/* 分页控件样式 */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.track-count {
  font-weight: 500;
}

.page-info {
  color: rgba(255, 255, 255, 0.6);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.page-size-select {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.page-size-select option{
  background: #2a2a2a !important;
  color: #fff !important;
}

.page-size-select:focus {
  outline: none;
  border-color: #4ecdc4;
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.page-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  min-width: 36px;
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-btn.active {
  background: #4ecdc4;
  border-color: #4ecdc4;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.album-link{
  cursor: pointer;
}
.artist-link{
  cursor: pointer;
}

/* 响应式设计 */
@media (min-width: 1201px) {
  .pagination-info {
    display: flex;
  }
  
  .page-buttons {
    display: flex;
  }
  
  .page-buttons .page-btn:not(:first-child):not(:last-child) {
    display: inline-block;
  }
}

@media (max-width: 1400px) {
  .col-year {
    display: none;
  }
  .col-duration {
    display: none;
  }
}

@media (max-width: 1200px) {
  .col-filesize {
    display: none;
  }
  .pagination-info {
    display: flex;
  }
  
  .page-buttons {
    display: flex;
  }
  
  .page-buttons .page-btn:not(:first-child):not(:last-child) {
    display: none;
  }
}

@media (max-width: 900px) {
  .col-album {
    display: none;
  }
  .music-table {
    font-size: 12px;
  }
  
  .music-table th,
  .music-table td {
    padding: 8px 4px;
    font-size: 12px;
  }
  
  .col-cover {
    width: 40px;
  }
  
  .cover-container {
    width: 30px;
    height: 30px;
  }
  
  .action-buttons {
    flex-direction: row;
    gap: 2px;
    flex-wrap: nowrap;
  }
  
  .action-btn {
    width: 24px;
    height: 24px;
    font-size: 0.8em;
    min-width: 24px;
  }
  
  .col-album {
    display: none;
  }
  
  .pagination-info {
    display: flex;
  }
  
  .page-buttons {
    display: flex;
  }
  
  .page-buttons .page-btn:not(:first-child):not(:last-child) {
    display: none;
  }
}

@media (max-width: 600px) {
  .col-duration {
    display: none;
  }
  .col-artist {
    display: none;
  }

  .col-title {
    min-width: 180px;
    width: 60%;
  }
  .col-actions {
    width: 120px;
    min-width: 120px;
  }
  
  .music-table th,
  .music-table td {
    padding: 6px 2px;
    font-size: 11px;
  }
  
  .action-buttons {
    flex-direction: row;
    gap: 1px;
    flex-wrap: nowrap;
  }
  
  .action-btn {
    width: 22px;
    height: 22px;
    font-size: 0.75em;
    min-width: 22px;
  }
  
  .pagination-info {
    display: flex;
  }
  
  .page-size-select {
    display: none;
  }
  
  .page-buttons {
    display: flex;
  }
  
  .page-buttons .page-btn:not(:first-child):not(:last-child) {
    display: none;
  }
}

@media (max-width: 480px) {
  .music-table th,
  .music-table td {
    padding: 4px 1px;
    font-size: 10px;
  }
  
  .col-title {
    min-width: 150px;
    width: 65%;
  }
  
  .action-buttons {
    flex-direction: row;
    gap: 1px;
    flex-wrap: nowrap;
  }
  
  .action-btn {
    width: 20px;
    height: 20px;
    font-size: 0.7em;
    min-width: 20px;
  }
  
  .pagination-info {
    display: none;
  }
  
  .page-size-select {
    display: none;
  }
  
  .page-buttons {
    display: flex;
  }
  
  .page-buttons .page-btn:not(:first-child):not(:last-child) {
    display: none;
  }
}

/* 移动端点击效果 */
@media (max-width: 900px) {
  .music-row {
    transition: background-color 0.2s ease;
  }
  
  .music-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .music-row:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* 禁用排序的列样式 */
.col-title:not(.sortable),
.col-artist:not(.sortable),
.col-album:not(.sortable),
.col-duration:not(.sortable),
.col-filesize:not(.sortable) {
  cursor: default;
}

.col-title:not(.sortable):hover,
.col-artist:not(.sortable):hover,
.col-album:not(.sortable):hover,
.col-duration:not(.sortable):hover,
.col-filesize:not(.sortable):hover {
  background-color: transparent;
}


